package com.ufida.ids.model;

// Generated 2012-3-27 14:08:00 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * PostModel generated by hbm2java
 */
@Entity
@Table(name = "IDS_POST")
public class PostModel implements java.io.Serializable {

	private Long postId;
	private OrgModel orgModel;
	private String postCode;
	private String postName;
	private String description;
	private Short showOrder;
	private Short entityStatus;
	private String creator;
	private Date createTs;
	private String lastModifier;
	private Date modifiedTs;
	private Set<PostStaffModel> postStaffModels = new HashSet<PostStaffModel>(0);

	public PostModel() {
	}

	public PostModel(String postName) {
		this.postName = postName;
	}

	public PostModel(OrgModel orgModel, String postCode, String postName, String description, Short showOrder,
			Short entityStatus, String creator, Date createTs, String lastModifier,
			Date modifiedTs, Set<PostStaffModel> postStaffModels) {
		this.orgModel = orgModel;
		this.postCode = postCode;
		this.postName = postName;
		this.description = description;
		this.showOrder = showOrder;
		this.entityStatus = entityStatus;
		this.creator = creator;
		this.createTs = createTs;
		this.lastModifier = lastModifier;
		this.modifiedTs = modifiedTs;
		this.postStaffModels = postStaffModels;
	}

	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "POST_ID", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getPostId() {
		return this.postId;
	}

	public void setPostId(Long postId) {
		this.postId = postId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORG_ID")
	public OrgModel getOrgModel() {
		return this.orgModel;
	}

	public void setOrgModel(OrgModel orgModel) {
		this.orgModel = orgModel;
	}

	@Column(name = "POST_CODE", length = 50)
	public String getPostCode() {
		return this.postCode;
	}

	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	@Column(name = "POST_NAME", nullable = false, length = 50)
	public String getPostName() {
		return this.postName;
	}

	public void setPostName(String postName) {
		this.postName = postName;
	}

	@Column(name = "DESCRIPTION", length = 2000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "SHOW_ORDER", precision = 22, scale = 0)
	public Short getShowOrder() {
		return this.showOrder;
	}

	public void setShowOrder(Short showOrder) {
		this.showOrder = showOrder;
	}

	@Column(name = "ENTITY_STATUS", precision = 22, scale = 0)
	public Short getEntityStatus() {
		return this.entityStatus;
	}

	public void setEntityStatus(Short entityStatus) {
		this.entityStatus = entityStatus;
	}

	@Column(name = "CREATOR", length = 20)
	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Column(name = "CREATE_TS")
	public Date getCreateTs() {
		return this.createTs;
	}

	public void setCreateTs(Date createTs) {
		this.createTs = createTs;
	}

	@Column(name = "LAST_MODIFIER", length = 20)
	public String getLastModifier() {
		return this.lastModifier;
	}

	public void setLastModifier(String lastModifier) {
		this.lastModifier = lastModifier;
	}

	@Column(name = "MODIFIED_TS")
	public Date getModifiedTs() {
		return this.modifiedTs;
	}

	public void setModifiedTs(Date modifiedTs) {
		this.modifiedTs = modifiedTs;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "postModel")
	public Set<PostStaffModel> getPostStaffModels() {
		return this.postStaffModels;
	}

	public void setPostStaffModels(Set<PostStaffModel> postStaffModels) {
		this.postStaffModels = postStaffModels;
	}

}
